package io.itit.ecp.admin.provide.action.resp;

import com.alibaba.fastjson.JSON;
import io.itit.grass.common.provide.action.resp.BaseResp;
import io.itit.grass.dict.starter.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：项目管理响应结果
 * @Date：Create by 2023-11-23 11:46:13
 */
@Data
@ToString
@ApiModel("项目管理响应结果")
public class SceneProjectResp extends BaseResp {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("项目名称")
    private String projectName;

    @ApiModelProperty("项目地点")
    private String address;

    @ApiModelProperty("交付时间")
    private String deliverTime;

    @ApiModelProperty("总用地面积(m²)")
    private BigDecimal landArea;

    @ApiModelProperty("总建筑面积(m²)")
    private BigDecimal floorArea;

    @ApiModelProperty("绿地面积(m²)")
    private BigDecimal greenArea;

    @ApiModelProperty("项目介绍")
    private String proRemark;

    @ApiModelProperty("项目图片")
    private String proImgs;

    @ApiModelProperty("项目负责人ID")
    private String userId;

    @ApiModelProperty("项目负责人")
    private String userName;

    @ApiModelProperty("联系方式")
    private String mobilePhone;

    @ApiModelProperty("背景图")
    private String backgroundImg;

    @ApiModelProperty("项目状态(1:待开发,2:开发中,3:已结束,4:已停止) >> distCode：ecp-admin.sceneProject.status")
    @Dict(dictCode = "ecp-admin.sceneProject.status")
    private String status;

    @ApiModelProperty("机构Id")
    private String deptId;

    public List<String> getImageList() {
        if (proImgs != null) {
            return JSON.parseArray(this.proImgs, String.class);
        }
        return Collections.emptyList();
    }

}
